home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / talksort.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1988-01-20  |  1.3 KB  |  22 lines

  1. 10  '*************************************************************************
  2. 20  '* For sorting DIALING DIRECTORY (PC-TALK.DIR) for PC-TALK  ver. III.    *
  3. 30  '*   written  by Jung W. Woo, Arlington, Va.              June, 1983.    *
  4. 40  '* This program also deletes unwanted items from the directory.  Just    *
  5. 50  '*   enter five dashes ("-----") in the name field before running.       *
  6. 60  '*************************************************************************
  7. 70  OPTION BASE1:DEFINT A-Z:DIM W$(60):PRINT"Sorting PC-TALK.DIR .";
  8. 80  ON ERROR GOTO 200:OPEN"PC-TALK.DIR" AS #1
  9. 90  FIELD #1,5 AS CK$:FIELD #1,104 AS RR$:FIELD #1,24 AS N$,36 AS R$,2 AS X$,4 AS B$,5 AS P$,2 AS T$,26 AS C$,3 AS L$,2 AS G$:GET#1,1:IF LEFT$(N$,10)<>"INITIALIII"THEN 190
  10. 100  I=5:J=0
  11. 110  GET#1,I:IF CK$<>"-----" THEN J=J+1:W$(J)=RR$
  12. 120  I=I+1:IF I<65 THEN 110
  13. 130  F=1:I=1:PRINT".";
  14. 140  IF W$(I)>W$(I+1)THEN SWAP W$(I),W$(I+1):F=0
  15. 150  I=I+1:IF I<J THEN 140
  16. 160  IF F=0 THEN 130
  17. 170  FOR I=1 TO J:LSET RR$=W$(I):PUT#1,I+4:NEXT:LSET N$="------------------------":RSET R$="- --- --- ----":LSET X$=MKI$(14):RSET B$="300":LSET P$="E71NN":LSET T$=MKI$(O):LSET C$=STRING$(26,"/"):LSET L$="":LSET G$=MKI$(0):FOR I=J+5 TO 64:PUT#1,I:NEXT
  18. 180  CLOSE:BEEP:PRINT" done !":END
  19. 190  BEEP:PRINT"PC-TALK.DIR not initialized.":CLOSE:END
  20. 200  CLOSE:IF ERL=80 THEN PRINT"PC-TALK.DIR not found.":RESUME 210
  21. 210  END
  22.